package com.example.spletnatrgovina.model;

import java.util.Locale;

public class Produkt {

	public final int id, zaloga;
	public final double cena;
	public final String ime, base_image, thumbnail, url;

	public Produkt(int id, String ime, double cena, int zaloga, String base_image, String thumbnail, String url) {
		this.id = id;
		this.ime = ime;
		this.cena = cena;
		this.zaloga = zaloga;
		this.base_image = base_image;
		this.thumbnail = thumbnail;
		this.url = url;
	}

	@Override
	public String toString() {
		return String.format(Locale.ENGLISH, "%s: (%.2f EUR)", ime, cena, zaloga);
	}
	
	public String toStringZaloga() {
		return String.format(Locale.ENGLISH, "%s: (%.2f EUR) \nZaloga: %d", ime, cena, zaloga);

	}
	
	public String getThumbnail() {
		return this.thumbnail;
	}
	
	public String getUrl() {
		return this.url;
	}
	
	public int getId() {
		return this.id;
	}
	
	public String getBaseImage() {
		return this.base_image;
	}
}
